import Cookies from 'js-cookie'

const TokenKey = 'Admin-Token'
const RolesKey = 'Admin-roles'
const NameKey = 'Admin-name'


const getToken = () => Cookies.get(TokenKey)
const setToken = (token) => Cookies.set(TokenKey, token)
const removeToken = () => Cookies.remove(TokenKey)

const setRoles = (roles) => Cookies.set(RolesKey, roles)
const getRoles = () => Cookies.get(RolesKey)
const removeRoles = () => Cookies.remove(RolesKey)


const setName = (name) => Cookies.set(NameKey, name)
const getName = () => Cookies.get(NameKey)
const removeName = () => Cookies.remove(NameKey)

export {
    getToken,
    setToken,
    removeToken,
    setRoles,
    getRoles,
    removeRoles,
    setName,
    getName,
    removeName
}